const label = '标题'
const name = 'DkAppTitle'

export default {
  icon: 'tdesign:work',
  label,
  name,
  rule() {
    return {
      type: name,
      props: {
        iconSize: 24
      },
      showStyle: true,
      children: [],
      style: {},
      setting: {
        style: {
          paddingLeft: '10px',
          paddingRight: '10px',
          paddingTop: '10px',
          paddingBottom: '10px',
          marginLeft: '10px',
          marginRight: '10px'
          // backgroundColor: 'rgba(255, 255, 255, 1)'
        }
      }
    }
  },
  props() {
    return [
      {
        type: 'radio',
        field: 'iconType',
        title: '图标类型',
        value: 'icon',
        options: [
          { label: '图标', value: 'icon' },
          { label: '图片', value: 'img' }
        ],
        control: [
          { value: 'icon', rule: [{ type: 'DkUniIconsInput', field: 'icon', title: '图标', value: 'fire-filled' }] },
          { value: 'img', rule: [{ type: 'DkImageInput', field: 'image', title: '图片图标', value: '' }] }
        ]
      },
      { type: 'number', field: 'iconSize', title: '图标尺寸', value: 24 },
      { type: 'number', field: 'marginRight', title: '间隔', value: 4 },
      { type: 'DkColorInput', field: 'iconColor', title: '图标颜色', value: '#F64C2E' },
      { type: 'input', title: '标题内容', field: 'title', value: '这是标题' },
      { type: 'DkColorInput', field: 'titleColor', title: '标题颜色', value: '#000' },
      { type: 'number', field: 'titleSize', title: '标题尺寸', value: 16 },
      { type: 'switch', field: 'titleBold', title: '加粗', value: false }
    ]
  }
}
